home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / lightwave / lwmlist / 96.lightwave-0222 / 000374_dwarner@webcom.com _Thu Feb 29 16:58:34 1996.msg < prev    next >
Internet Message Format  |  1996-03-08  |  4KB

  1. Received: from mail.webcom.com (mail.webcom.com [206.2.192.68]) by keeper.albany.net (8.7.4/8.7.4-MZ) with ESMTP id QAA06242 for <DWARNER@ALBANY.NET>; Thu, 29 Feb 1996 16:58:33 -0500 (EST)
  2. Received: from localhost by mail.webcom.com with SMTP
  3.     (1.37.109.15/16.2) id AA098741132; Thu, 29 Feb 1996 13:58:53 -0800
  4. Date: Thu, 29 Feb 1996 13:58:52 -0800
  5. Errors-To: dwarner@ALBANY.NET
  6. Message-Id: <199602292141.NAA00515@netcom15.netcom.com>
  7. Errors-To: dwarner@ALBANY.NET
  8. Reply-To: lightwave@garcia.com
  9. Originator: lightwave@garcia.com
  10. Sender: lightwave@garcia.com
  11. Precedence: bulk
  12. From: bhood@netcom.com (robert hood)
  13. To: lightwave@mail.webcom.com
  14. Subject: Re: Making a helix..
  15. X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
  16. Status: RO
  17. X-Status: 
  18.  
  19. > I just did this while making a spiral staircase (you can see it 
  20. > at the URL in my sig)
  21. > Here's how ...
  22. > 1) make a single point (not a polygon) at 0,0,0
  23. > 2) clone the point - i.e. 11 clones, 30 degree rotation around 
  24. > the Y, 10cm offset in the Y. This will give you a set of 12 
  25. > points in a helix (1 rotation).
  26. > 3) select the points in order, and hit 'p' to make a path.
  27. >
  28. >
  29. > 4) put the helix in a background layer and use for a rail
  30. > extrude of a disc (or whatever).
  31. >
  32.  
  33. Gabe, just for grins I decided to convert your instructions into a BML
  34. script.  Took me about two minutes to write:
  35.  
  36. ----------------------------------------------------------------------------
  37. // Create a Helix Coil curve in layer #2, and railclone() an object in
  38. // layer #1 along it.  Place your object in layer #1, rotated appropriately,
  39. // with it's center placed on the location of the first point created (i.e.,
  40. // <.5,0,0>).
  41. //
  42. // A better script would calculate that object center point, and use it as
  43. // starting point of the Helix Coil.
  44. //                                                    02.29.96
  45. //                                                    Bob Hood
  46.  
  47. main
  48. {
  49.     var SEGMENTS = 12;      // twelve points
  50.     var p[SEGMENTS];
  51.     var x,y,l,radius,torad,degrees,radians;
  52.  
  53.     // some requester code would be nice here to get
  54.     // user parameters (radius, segments, etc.)
  55.  
  56.     setlayer(2);    // this should be re-written to *look* for an empty layer
  57.  
  58.     editbegin();
  59.  
  60.     l = <.5,0,0>;   // start half a meter down the X axis
  61.     p[1] = addpoint(l);
  62.  
  63.     radius = sqrt((l.x * l.x) + (l.z * l.z));
  64.     degrees = 30;
  65.  
  66.     for(x = 2;x <= SEGMENTS;x++)
  67.     {
  68.         l.y += .1;      // 10 cm == .1 meter
  69.  
  70.         l.x = radius * cos(rad(degrees));
  71.         l.z = radius * sin(rad(degrees));
  72.  
  73.         p[x] = addpoint(l);
  74.  
  75.         degrees += 30;
  76.     }
  77.  
  78.     addcurve(p);
  79.  
  80.     editend();
  81.  
  82.     setlayer(1);        // again, assumptions being made about the state
  83.     setblayer(2);       // of layers that probably shouldn't be
  84.  
  85.     railclone(SEGMENTS,KNOTS,"o");  // "o"riented
  86. }
  87. ----------------------------------------------------------------------------
  88.  
  89. Damn I love BML, even if I did write it.  =|^)
  90.  
  91. Render me gone,               |||
  92. Bob                         ^(===)^
  93. -------------------------oOO--(_)--OOo--------------------------------------
  94. Bob Hood, President | All governments suffer from a recurring problem:
  95. Virtual Visions,Inc.| Power attracts pathological personalities.  It is not
  96. Tel: 1.303.989.4191 | that power corrupts, but that it is magnetic to the
  97. FAX: 1.303.727.7555 | corruptible.  Such people have a tendency to become
  98.                     | drunk on violence, a condition to which they are
  99. bhood@netcom.com    | quickly addicted              - Frank Herbert
  100. ----------------------------------------------------------------------------